/**
  ******************************************************************************
  * @file    sym32l010_hal_crc.h
  * @author  AE Team
  * @version 1.0.3
  * @date    2024-05-28
  * @brief   Header file of CRC HAL module.
  *
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2024 SIYIMicro.
  * All rights reserved.</center></h2>
  *
  *
  ******************************************************************************
  */


/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __SYM32L010_HAL_CRC_H
#define __SYM32L010_HAL_CRC_H

#ifdef __cplusplus
extern "C" {
#endif


/******************************************************************************/
/* Include files                                                              */
/******************************************************************************/
#include "sym32l010_hal_def.h"


/******************************************************************************/
/* Global type definitions                                                    */
/******************************************************************************/
typedef enum
{
    CRC16_IBM        = 0x0UL,
    CRC16_MAXIM      = 0x1UL,
    CRC16_USB        = 0x2UL,
    CRC16_MODBUS     = 0x3UL,
    CRC16_CCITT      = 0x4UL,
    CRC16_CCITTFALSE = 0x5UL,
    CRC16_X25        = 0x6UL,
    CRC16_XMODEM     = 0x7UL
} CRC_ModeTypeDef;


/******************************************************************************/
/* Global pre-processor symbols/macros ('#define')                            */
/******************************************************************************/


/******************************************************************************/
/* Global macro function                                                      */
/******************************************************************************/


/******************************************************************************/
/* Exported variables ('extern', definition in C source)                      */
/******************************************************************************/


/******************************************************************************/
/* Global function prototypes ('extern', definition in C source)              */
/******************************************************************************/
uint16_t HAL_CRC_Calc_8bit(CRC_ModeTypeDef Mode, uint8_t *pByteBuf, uint32_t ByteCnt);
uint32_t HAL_CRC32_Default_Calc_Firmware(uint8_t *pByteBuf, uint32_t ByteCnt);
uint32_t HAL_CRC32_Mpeg2_Calc_Firmware(uint8_t *pByteBuf, uint32_t ByteCnt);


#ifdef __cplusplus
}
#endif

#endif /* __SYM32L010_HAL_CRC_H */


/************************ (C) COPYRIGHT SIYIMicro *****END OF FILE*************/
